<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        let {
            x,
            y,
            ...z
        } = {
            x: 1,
            y: 2,
            a: 3,
            b: 4
        };
        console.log(x, y, z); // 1 2 {a: 3, b: 4}

        // ----------------------------------------------

        let json = {
            a: 1,
            b: 2
        }
        let json2 = {
            ...json
        }
        delete json2.b
        console.log(json2); // {a: 1}
        console.log(json); // {a: 1, b: 2}
    </script>
</body>

</html>